import request from '@/utils/request'

// 获取组织结构
export const departmentGetService = () => request.get('/company/department')

// 获取组织负责人列表
export const departmentManagerService = () => request.get('/sys/user/simple')

// 新增部门
export const departmentAddService = data => request.post('/company/department', data)

// 获取部门详情
export const departmentDetailService = id => request.get(`/company/department/${id}`)

// 更新部门详情
export const departmentUpdateService = data => request.put(`/company/department/${data.id}`, data)

// 删除部门
export const departmentDeleteService = id => request.delete(`/company/department/${id}`)
